#ifndef INTERVIEWDIALOG_H
#define INTERVIEWDIALOG_H

#include <QLabel>
#include <QDialog>
#include <QScrollArea>
#include <QTextBrowser>
#include "model/data.h"

namespace Ui {
class InterviewDialog;
}

class InterviewDialog : public QDialog
{
    Q_OBJECT

public:
    explicit InterviewDialog(QWidget *parent = nullptr);
    ~InterviewDialog();

    void set(const model::InterviewInfo& info);

private slots:
    void on_btn_close_clicked();

private:
    void init();
    void initStyleSheet();
    void initPanel();
    void initBody();

    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    bool _isDraging = false;
    QPoint _dragPosition;

private:
    QWidget *_container = nullptr;
    QScrollArea *_scrollArea = nullptr;
    QTextBrowser *_content = nullptr;

    Ui::InterviewDialog *ui;
};

#endif // INTERVIEWDIALOG_H
